#include "xunji.h"

void xunji(void)
{
	if(xunji_1==0&&xunji_2==0&&xunji_3==0&&xunji_4==0)
	{
		X_Speed = -1;		  
		Z_Speed = 0;		  
	}
	else if((xunji_1==1)&&(xunji_4==0))
	{
		X_Speed = 0;		  
		Z_Speed = 10;		 
	}	  
	else if((xunji_1==1)&&(xunji_2==1)&&(xunji_3==0)&&(xunji_4==1))
	{
		X_Speed = -1;		  
		Z_Speed = 10;		 
	}	  
	else if((xunji_1==1)&&(xunji_2==0)&&(xunji_3==1)&&(xunji_4==1))
	{
		X_Speed = -1;		  
		Z_Speed = -10;		 
	}	  
	else if((xunji_1==0)&&(xunji_4==1))
	{
		X_Speed = 0;		  
		Z_Speed = -10;	
	}
	else if(xunji_1==1&&xunji_2==1&&xunji_3==1&&xunji_4==1)
	{
		X_Speed = 1;		  
		Z_Speed = 0;	
	}
	else
	{
		X_Speed = 0;		  
		Z_Speed = 0;	
	}
}	
